A-A+
KingCMS企业版(PHP)如何支持非根目录安装
鉴于大家对 KingCMS PHP企业版 只能安装在网站根目录而不能装在子目录下而深表遗憾,此次已将在该BUG纳入SP1的BUG修复列表中。但很多人已经等不及SP1的发布,所以这里我先把修改方法告诉大家,已解广大KingCMS用户的燃眉之急。
本次修改仅涉及一个文件:system/core.class.php。
1、打开 system/core.class.php;
2、找到660行:
if(substr($path_info,0,10)=='/index.php'){ $path_info=substr($path_info,10); } |
将其替换为:
if(substr($path_info,0,9+strlen($this->config('inst')))==$this->config('inst').'index.php'){ $path_info=substr($path_info,9+strlen($this->config('inst'))); } |
3、找到667行:
'url'=>$_SERVER['SERVER_NAME'], |
将其替换为:
'url'=>$_SERVER['SERVER_NAME'].$this->config('inst'), |
这样就完成整个修改过程了。
评论已关闭!